<template>
    <div class="NVG">
        <!--        <el-menu :default-active="activeIndex" :router="true" class="el-menu-demo center" mode="horizontal" @select="handleSelect">-->
        <!--                <el-menu-item index="/">首页</el-menu-item>-->
        <!--                <el-submenu index="2">-->
        <!--                    <template slot="title">我的工作台</template>-->
        <!--                    <el-menu-item index="2-1">每日讯息</el-menu-item>-->
        <!--                    <el-menu-item index="2-2">表格下载</el-menu-item>-->
        <!--                    <el-menu-item index="2-3">发票上传</el-menu-item>-->
        <!--                </el-submenu>-->
        <!--                <el-menu-item index="3">考勤管理</el-menu-item>-->
        <!--                <el-menu-item index="/home">管理控制台</el-menu-item>-->
        <!--            <div class="aaa">eeehjkdshfj</div>-->
        <!--        </el-menu>-->
        <header class="header">
            <div class="center">
                <div class="logoImg">
                    <img alt="" src="../assets/images/海浪.png" />
                </div>
                <div class="navList">
                    <div class="leftList">
                        <span :class="activeIndex === 1 ? active : ''" @click="choiceItem(1)">首页</span>
                        <span :class="activeIndex === 2 ? active : ''" @click="choiceItem(2)">我的工作台</span>
                        <span :class="activeIndex === 3 ? active : ''" @click="choiceItem(3)">EPCS</span>
                        <span :class="activeIndex === 4 ? active : ''" @click="choiceItem(4)">管理控制台</span>
                    </div>
                    <div class="rightList">
                        <span>登陆</span>
                    </div>
                </div>
            </div>
        </header>
    </div>
</template>

<script>
export default {
    name: "headerNVG",
    data() {
        return {
            active: "active",
            activeIndex: 1,
        };
    },
    methods: {
        choiceItem(index) {
            console.log(index);
            this.activeIndex = index;
        },
    },
};
</script>

<style lang="less" scoped>
.header {
    width: 100%;
    min-width: 1240px;
    height: 60px;
    background-color: #000;
    position: fixed;
    top: 0;
    z-index: 999;

    .center {
        width: 1200px;
        margin: 0 auto;
        display: flex;
        align-items: center;

        .logoImg {
            display: inline-block;

            img {
                width: 40px;
            }
        }

        .navList {
            width: 1150px;
            display: flex;
            color: #fff;
            justify-content: space-between;

            .leftList {
                :hover {
                    color: #3b85f5;
                    transition-duration: 0.3s;
                }

                span {
                    display: inline-block;
                    width: 110px;
                    height: 60px;
                    line-height: 58px;
                    text-align: center;
                    cursor: pointer;
                }
            }

            .rightList {
                :hover {
                    color: #3b85f5;
                    transition-duration: 0.3s;
                }

                span {
                    display: inline-block;
                    width: 110px;
                    height: 60px;
                    line-height: 58px;
                    text-align: center;
                    cursor: pointer;
                }
            }
        }
    }
}

.active {
    color: #3b85f5;
}
</style>
